package com.midele.goodstuff.data.repository.net_util

/**
 * 网络请求结果密封类
 */
sealed class NetworkResult<T> {
    data class Success<T>(val data: T) : NetworkResult<T>()
    data class Error<T>(val code: Int, val message: String) : NetworkResult<T>()
    class Loading<T> : NetworkResult<T>()
}

/**
 * 网络请求响应包装类
 */
data class ApiResponse<T>(
    val code: Int,
    val message: String,
    val data: T?
)